#ifndef ARRAY_H
#define ARRAY_H

#include <iostream>
#include <string>

class Rational
{
	private:
		int up;
		int down;
		void checkSigns();
		void divide();
	public:
		Rational(int up_, int down_ = 1);
		Rational(const Rational& another);
		Rational& operator= (const Rational &another);
		void swap(Rational& another);
		int getUp();
		int getDown();
		Rational operator*=(const Rational& a);
		Rational operator/=(const Rational& a);
		Rational operator+=(const Rational& a);
		Rational operator-=(const Rational& a);
		Rational& operator++();
		Rational operator++(int);
		Rational& operator--();
		Rational operator--(int);
		operator double();
		friend std::ostream& operator << (std::ostream& out, const Rational& r);
		friend bool operator==(const Rational& a, const Rational& b);
		friend bool operator!=(const Rational& a, const Rational& b);	
		friend bool operator<(const Rational& a, const Rational& b);
		friend bool operator<=(const Rational& a, const Rational& b);	
		friend bool operator>(const Rational& a, const Rational& b);
		friend bool operator>=(const Rational& a, const Rational& b);	
		friend Rational operator*(const Rational& a, const Rational& b);
		friend Rational operator/(const Rational& a, const Rational& b);
		friend Rational operator-(const Rational& a, const Rational& b);
		friend Rational operator+(const Rational& a, const Rational& b);
};

#endif
